var adminApp = new Vue({
    el: '#adminApp',
    data: {
        admin_nickname: "admin"
    },
    methods: {

        loadUserName: function (userId) {
            axios.get("/selectNicknameByUserId?userId=" + userId).then(function (response) {
                adminApp.admin_nickname = response.data;
                console.log(response.data);
            }).catch(function (err) {
                alert(err);
            })
        },

        // loadUserName: function () {
        //     axios.get("/selectNicknameByUserId").then(function (response) {
        //         adminApp.admin_nickname = response.data;
        //         console.log(response.data);
        //     }).catch(function (err) {
        //         alert(err);
        //     })
        // },
    },
    created: function () {
        console.log("执行了方法");
        this.loadUserName();
    }
});